#include <iostream>
#include <cmath>
using namespace std;

signed main()
{
	double r1,p1,r2,p2;
	cin>>r1>>p1>>r2>>p2;
	double A = r1*cos(p1)*r2*cos(p2)-r1*sin(p1)*r2*sin(p2);
	double B = r1*cos(p1)*r2*sin(p2)+r1*sin(p1)*r2*cos(p2);
    if(A<0&&A>=-0.005)    printf("0.00");
	else    printf("%.2f",A);
	if(B>=-0.005)printf("+");
    if(B<0&&B>=-0.005)    printf("0.00i");
	else    printf("%.2fi",B);
	return 0;
}
